Conversation
…L examples The initial lowercase conversion had several bugs: - Widget builder used strings.ToUpper(w.Type) with lowercase case values, causing "unsupported widget type: layoutgrid/datagrid" at runtime. Fixed all ToUpper → ToLower in page builder, widget engine, and validation code. - MDL example files had qualified identifiers after '.' incorrectly lowercased (System.Image → System.image, System.User → System.User, etc.) because the conversion script did not protect all identifier positions. Restored correct Mendix entity/role name casing. - Business event attribute types (Long, String) stored as raw parser text were now lowercase. Added canonical casing map in dataTypeSimpleName() so the BSON always receives "Long", "String", etc. regardless of MDL input casing. - publish/subscribe switch and objectType switches used ToUpper against lowercase case values. Fixed to ToLower throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
More ToUpper-with-lowercase-cases bugs and hardcoded uppercase strings:
- Workflow properties: visitor hardcoded "DISPLAY", "EXPORT_LEVEL" etc. but
mutator case values were already lowercase. Normalized all property strings
(both hardcoded in visitor and remaining uppercase cases in mutator) to
lowercase. Updated tests accordingly.
- Settings executor: strings.ToUpper(stmt.Section) with lowercase case values.
Changed to ToLower; fixed "LANGUAGE" case and hardcoded "CONSTANT"/
"CONFIGURATION" in visitor. Fixed MDL example (alter settings LANGUAGE).
- Entity event handlers: describe output used ToUpper for moment/event name.
Changed to ToLower so output is "on before commit" not "on BEFORE COMMIT".
- REST client: method stored as BSON title case ("Get"), describe output needs
strings.ToLower to produce "get" not "Get".
- Design properties: ON/OFF toggle values hardcoded as "ON"/"OFF" in visitor
but switch used ToUpper with lowercase "on"/"off" cases. Fixed visitor to
produce lowercase and switch to use ToLower.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same ToUpper-with-lowercase-cases pattern in more files:
- visitor_rest.go: ResponseType and BodyType hardcoded as "JSON", "MAPPING"
etc., while executor switches use lowercase "json", "mapping". Fixed all
to lowercase; also "EXPORT_MAPPING" → "export_mapping" in executor.
- cmd_alter_workflow.go: "OVERVIEW_PAGE" and "TARGETING_MICROFLOW" cases
still uppercase, causing SetPropertyWithEntity to never be called for
overview_page (falling to default SetProperty which errored).
- cmd_settings.go: "LANGUAGE" case was still uppercase despite earlier fix.
- cmd_pages_builder_v3.go: ob.Direction sort used ToUpper("desc") == "desc"
which is always false, so descending sort never worked. Fixed to ToLower.
- cmd_diff_mdl.go: log level output used ToUpper, producing "WARNING" in
diff MDL. Fixed to ToLower.
- 12-styling-examples.mdl: URL {Task} didn't match page param $task. Fixed
to {task}.
- roundtrip_doctype_test.go: Added CE3637 to known limitations for
03-page-examples.mdl (gallery/dataview sibling scope, pre-existing issue
masked by the earlier layoutgrid build failure).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… to lowercase
BSON parser (sdk/mpr/parser_rest.go) always returns uppercase ResponseType
and BodyType ("JSON", "NONE", "MAPPING" etc.). The describe switches in
cmd_rest_clients.go were using exact lowercase case matches, so every
response fell through to the "none" default.
Fixed by adding strings.ToLower() normalization on both the BodyType and
ResponseType switches so they accept values from both the BSON parser
(uppercase) and the MDL visitor (lowercase).
Also fixed BooleanConditionOutcome.GetName() in sdk/workflows/workflow.go
which returned "TRUE"/"FALSE" but workflow describe output and tests
expect lowercase "true"/"false".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.